<template>
	<view class="page-content-box">
		<view class="notice-content-box">
			<view class="notice-content">
				<view class="title">{{data.title}}</view>
				<view class="content">
					<rich-text type="text" :nodes="data.content" space="nbsp"></rich-text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	var graceRichText = require("../../common/richText.js");
	export default {
		data() {
			return {
				data:{}
			}
		},
		onLoad(options) {
			console.log(options.id);
			var id = options.id;
			this.getContent(id);
		},
		methods: {
			getContent(id){
				var _this = this;
				this.$client.get('/api/notice/getdata', {id:id}, function(res,message){
					_this.data = res.info;
					_this.data.content = graceRichText.format(_this.data.content);
				},function(res){
					
				});
			}
		}
	}
</script>

<style>
	.notice-content-box{
		padding: 20rpx;
		box-sizing: border-box;
	}
	.notice-content{
		width: 100%;
		background: #FFFFFF;
		border-radius: 20rpx;
		padding: 30rpx 20rpx;
		box-sizing: border-box;
	}
	.notice-content .title{
		font-size: 36rpx;
		font-weight: bold;
		color: #161616;
		padding: 20rpx 30rpx;
		line-height: 60rpx;
		text-align: left;
		box-sizing: border-box;
	}
	.notice-content .content{
		padding: 20rpx 0;
	}
	.notice-content rich-text{
		font-size: 28rpx;
		color: #161616;
		line-height: 34rpx;
		box-sizing: border-box;
	}
</style>
